home *** CD-ROM | disk | FTP | other *** search
/ Champak 146 / (Vol 146) Jan 07 2012.iso / Games / tontie_hammer.swf / scripts / DefineSprite_156 / frame_4 / DoAction.as
Text File  |  2012-01-07  |  3KB  |  108 lines

  1. with(doka)
  2. {
  3.    gotoAndPlay("on");
  4. }
  5. if(_parent.enemy_i == 0)
  6. {
  7.    _root.damage(_root.karaburi);
  8.    _parent.se = "karaburi";
  9. }
  10. else if(_parent.enemy_i == 1)
  11. {
  12.    if(_parent.hit == 1)
  13.    {
  14.       _parent.hp -= _root.attack;
  15.       if(_parent.hp <= 0)
  16.       {
  17.          _parent.se = "todome";
  18.          _parent.attack = 0;
  19.          _root.score += _parent.score;
  20.          with(_parent.dodai_all.enemy_all.enemy)
  21.          {
  22.             gotoAndStop("die");
  23.          }
  24.       }
  25.       else
  26.       {
  27.          _parent.se = "hit";
  28.       }
  29.    }
  30.    else if(_parent.hit != 2)
  31.    {
  32.       if(_parent.hit == 3)
  33.       {
  34.          _parent.hp -= _root.attack;
  35.          if(_parent.hp <= 0)
  36.          {
  37.             _parent.se = "todome";
  38.             _parent.attack = 0;
  39.             _root.score += _parent.score;
  40.             with(_parent.dodai_all.enemy_all.enemy)
  41.             {
  42.                gotoAndStop("die");
  43.             }
  44.          }
  45.          else if(_parent.sikaesi != "coin")
  46.          {
  47.             _parent.se = "damage";
  48.             _root.damage(_parent.sikaesi);
  49.          }
  50.          else if(_root.money > 0)
  51.          {
  52.             _parent.se = "damage_coin";
  53.             _root.damage_coin();
  54.             with(_parent.dodai_all.enemy_all.enemy.char)
  55.             {
  56.                gotoAndPlay("on");
  57.             }
  58.          }
  59.       }
  60.       else if(_parent.hit == "bakudan")
  61.       {
  62.          _parent.se = "bokan";
  63.          _parent.hp -= _root.attack;
  64.          _root.damage(_parent.sikaesi);
  65.          _parent.attack = 0;
  66.          _root.score += _parent.score;
  67.          with(_parent.dodai_all.enemy_all.enemy.i)
  68.          {
  69.             gotoAndPlay("bokan");
  70.          }
  71.       }
  72.       else if(_parent.hit == "shop")
  73.       {
  74.          stopAllSounds();
  75.          _parent.se = "shop_in";
  76.          _root.mogura_on = 100;
  77.          _root.piko_ok = 0;
  78.          _root.piko = [];
  79.          _root.lv_con = _root.lv_up.sikaku.k;
  80.          with(_root.up_boad)
  81.          {
  82.             gotoAndPlay("shop");
  83.          }
  84.       }
  85.    }
  86. }
  87. else
  88. {
  89.    if(_parent.item_i == "life")
  90.    {
  91.       _parent.se = "life_get";
  92.       _root.kaihuku(_parent.up_i);
  93.       _parent.enemy_i = 0;
  94.    }
  95.    else if(_parent.item_i == "coin")
  96.    {
  97.       _parent.se = "coin_get";
  98.       _root.money += _parent.up_i;
  99.       _parent.enemy_i = 0;
  100.    }
  101.    _parent.dodai_all.joutai = "down";
  102.    with(_parent.dodai_all.enemy_all.enemy.i)
  103.    {
  104.       gotoAndStop("non");
  105.    }
  106. }
  107. _root.sound(_parent.se);
  108.